package com.sourcetrip.my.modle;

/**
 * @author: ZhouBert
 * @date: 2021/1/13
 * @description:	图的边信息
 * --
 * 用于避免图的内部结构 Edge 被暴露，于是外部使用了 EdgeInfo 来表示图的边信息。
 * --
 *
 */
public class EdgeInfo<V, E> {

	private V from;
	private V to;
	private E weight;
	public EdgeInfo(V from, V to, E weight) {
		this.from = from;
		this.to = to;
		this.weight = weight;
	}
	public V getFrom() {
		return from;
	}
	public void setFrom(V from) {
		this.from = from;
	}
	public V getTo() {
		return to;
	}
	public void setTo(V to) {
		this.to = to;
	}
	public E getWeight() {
		return weight;
	}
	public void setWeight(E weight) {
		this.weight = weight;
	}
	@Override
	public String toString() {
		return "EdgeInfo [from=" + from + ", to=" + to + ", weight=" + weight + "]";
	}
}
